#include "CHashTable.h"
#include <iostream>
#include <string.h>

CHashTable::CHashTable(void)
{
}


CHashTable::~CHashTable(void)
{
}

bool CHashTable::AddPerson()
{


	return true;
}


int CHashTable::CalculateHash(char* _sNachname)
{
	unsigned int hash = 0;
	int n = std::strlen(_sNachname);
	int pow = 1;
	for(int i = 0; i < n; i++)
	{
		pow *= 31;
		hash += static_cast<int>(_sNachname[i])*pow;
	}
	return hash;
}


CPerson CHashTable::SearchPerson()
{


}


unsigned long CHashTable::GetPersonCount()
{
	return m_PersonCount;
}

int CHashTable::Probe(int _hash)
{
	return _hash % m_Modulo;
}